import request from '@/utils/request'

export function apiGetUser() {
    return request({
        api: 'mgop.linewell.eraq.user', // 必填
        url: "/api/user",
        method: 'GET',
    });
}

export function apiGetUri() {
    return request({
        api: "mgop.linewell.eraq.supplyFilePath",
        url: "/api/eraq/supply/file/path",
        method: "get",
    });
}

export function apiLogout() {
    return request({
        api: "mgop.linewell.eraq.userLogout",
        url: "/api/user/logout",
        method: "post"
    });
}

export function apiGrSsoLogin(ticket) {
    return request({
        api: 'mgop.linewell.eraq.ssoLogin', // 必填
        url: "/api/user/sso/login",
        params: {
            ticket
        },
        method: 'GET',
        noToken: true
    });
}

export function apiWxSsoLogin(ticketId) {
    return request({
        api: 'mgop.linewell.eraq.ssoLoginWx', // 必填
        url: "/api/user/sso/wechat/login",
        params: {
            ticketId, from: "mb"
        },
        method: 'GET',
        noToken: true
    });
}

